package com.study.service;

import java.util.List;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import com.study.beans.User;
//服务端熔断处理
//@FeignClient(value = "CLOUD-PROVIDER")
//客户端服务降级处理
@FeignClient(value = "CLOUD-PROVIDER", fallbackFactory = UserClientServiceFallbackFactory.class)
public interface UserClientService {

	@GetMapping("/user/get/{id}")
	public User get(@PathVariable("id") Integer id);

	@GetMapping("/user/list")
	public List<User> list();

	@PostMapping("/user/add")
	public boolean add(User user);
}
